package edu.zut.hys.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.zut.hys.base.entity.Permission;
import edu.zut.hys.base.mapper.PermissionMapper;
import edu.zut.hys.base.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author houyingsheng
* @description 针对表【permission】的数据库操作Service实现
* @createDate 2023-01-05 23:28:37
*/
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission>
    implements PermissionService{
    @Autowired
    PermissionMapper permissionMapper;

    @Override
    public Permission getOneByResource(String resource) {
        return permissionMapper.selectOne(new QueryWrapper<Permission>().eq("resource",resource));
    }
}




